package app.WeightedFPTree;



/* ---------------------------------------------------------------------- */
/*                                                                        */
/*                         FP GROWTH APPLICATION                          */
/*                                                                        */
/*                             Frans Coenen                               */
/*                                                                        */
/*                       Thursday 5th February 2003                       */
/*                Minor modifications: Wednesday 8 October 2008           */
/*                                                                        */
/*                     Department of Computer Science                     */
/*                      The University of Liverpool                       */
/*                                                                        */ 
/* ---------------------------------------------------------------------- */

import java.io.*;

public class FPgrowthApp {
    
    // ------------------- FIELDS ------------------------
    
    // None
    
    // ---------------- CONSTRUCTORS ---------------------
    
    // None
    
    // ------------------ METHODS ------------------------
    
    /**
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {
        
	// Create instance of class FPTree
	
        String[] args1 = new String[]{"-Faaaa", "-S30","-C100","-Wbbbb"};
          
	FPtree newFPtree = new FPtree(args1);
	
	// Read data to be mined from file
	
	newFPtree.inputDataSet();
	
	// Reorder and prune input data according to frequency of single 
	//attributes	
	newFPtree.idInputDataOrdering();
	newFPtree.recastInputDataAndPruneUnsupportedAtts1(); 
	//newFPtree.setNumOneItemSets();
newFPtree.outputDataArray();
newFPtree.outputWeightArray();
        // Build initial FP-tree
	
	double time1 = System.currentTimeMillis(); 
	newFPtree.createFPtree();

	newFPtree.outputDuration(time1,System.currentTimeMillis());
newFPtree.outputFPtreeStorage();			
newFPtree.outputFPtree();
newFPtree.outputItemPrefixSubtree();

	// Mine FP-tree
	
	time1 = System.currentTimeMillis(); 
	newFPtree.startMining();
	newFPtree.outputDuration(time1,System.currentTimeMillis());
/*newFPtree.outputStorage(); 
newFPtree.outputNumFreqSets(); 
newFPtree.outputTtree(); // Frequent sets arec stored in this structure
newFPtree.outputRules();	*/
	}
    }
    
